From: Keir Fraser Date: Thu, 18 Jun 2009 09:27:21 +0000 (+0100) Subject: xend: Improve error messages of xm sched-credit X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13732 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6c11039cbd07fb537b33dbf57d579ce57be1ab88;p=xen.git xend: Improve error messages of xm sched-credit This patch improves error messages of xm sched-credit as with error messages of CS:19468. Signed-off-by: Masaki Kanno --- diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index a8ee276df8..fc654b5b1d 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -1583,14 +1583,17 @@ class XendDomain: if weight is None: weight = int(0) elif weight < 1 or weight > 65535: - raise XendError("weight is out of range") + raise XendError("Cpu weight out of range, valid values are " + "within range from 1 to 65535") else: set_weight = True if cap is None: cap = int(~0) elif cap < 0 or cap > dominfo.getVCpuCount() * 100: - raise XendError("cap is out of range") + raise XendError("Cpu cap out of range, valid range is " + "from 0 to %s for specified number of vcpus" % + (dominfo.getVCpuCount() * 100)) else: set_cap = True